package acm.pta2;

import java.util.Scanner;

public class T1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String N = scanner.nextLine();
        int length = N.length();
        int count = 0;
        for (char c : N.toCharArray()) {
            if (c == '2') {
                count++;
            }
        }
        double degree =1;
        if (N.charAt(0) == '-') {
            degree = 1.5;
            length--;
        }
        degree =degree*count / length * 100;
        if ((N.charAt(N.length() - 1) - '0') % 2 == 0) {
            degree *= 2;
        }
        System.out.printf("%.2f%%\n", degree);
    }
}
